#ifndef _refine_smooth3_h_
#define _refine_smooth3_h_

#include "types.h"

namespace refine {

namespace smooth3 {

struct params {
	int fore_depth; ///< depth of unknown region in the preliminary foreground area: 1, 2, 3, ...
	int back_depth; ///< depth of unknown region in the preliminary background area: 1, 2, 3, ...
	int whs; //smooth window half-size: 1, 2, 3, ...
	int passes_num; //top bound: 1, 2, 3, ...
	//float max_condition_number; // should be greater than 1
	bool ultra_clear;
	bool silent;
};

extern params const default_params;

void perform(
	const byte_image & src, 
	const bit_mask::mask & m, 
	grey_mask::mask & s, 
	const params & p = default_params);

//in this version grey_mask already has initial mask approximation
void perform(
	const byte_image & src, 
	grey_mask::mask & s, 
	const params & p = default_params);

void perform(
	argb_byte_image & src, 
	const params & p = default_params);

} //namespace smooth3

} //namespace refine

#endif //_refine_smooth3_h_
